package com.heima.search.feign;

import com.heima.model.article.dtos.ArticleHomeDto;
import com.heima.model.article.pojos.ApArticle;
import com.heima.search.service.ApArticleSearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/api/v1/article/search")
public class SearchFeign {
    @Autowired
    private ApArticleSearchService articleSearchService;

    @PostMapping("/load")
    public List<ApArticle> load(@RequestBody ArticleHomeDto dto) {
        return articleSearchService.load(dto);
    }
}
